package com.example.order.controller;

import com.example.order.dao.OdersDAO;
import com.example.order.dao.WareDAO;
import com.example.order.entity.OdersEntity;
import com.example.order.entity.WareEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api("下订单相关")
public class WareController {

    @Autowired
    WareDAO wareDAO;

    @ApiOperation("查询库存")
    @GetMapping("/getware")
    public List<WareEntity> getWares(){

        return  wareDAO.getWares();
    }
}
